local game = class("game")
function game:init(room)
    self.room = room
    self.world = bump.newWorld()
    self.objects = {}
    self.players = {}
    self.localID = 0
    Map(self,1,1,16,16)
end


function game:initCam()
    self.cam = Cam.new(0,0,self.map.w*16,self.map.h*16)
    local sw,sh = love.graphics.getDimensions()
    self.cam:setWindow(sw/2-sh/2,0,sh,sh)
    self.cam:setScale(sh/WindowMaxSize,sh/WindowMaxSize)
end



function game:newLocalID()
    self.localID = self.localID - 1
    return self.localID
end

function game:setLocalObj(obj)
    obj:setID(self:newLocalID())
end

function game:update(dt)
    for id,obj in pairs(self.objects) do
        obj:update(dt)
    end
end

function game:onKill(k,v)

end

function game:onGetItem(tank,item)
    
end

function game:onBaseFall()
    
end

return game